home *** CD-ROM | disk | FTP | other *** search
/ CD World Haziran 1997 / CD World Haziran 1997.iso / Internet ve Net Programlari / WebSite WEB Server Evaluation / WebSite WEB Server evaluation version. 32 bit Windows required.Z / TESTCGI.BA_ / TESTCGI.BA
Encoding:
Text File  |  1995-02-20  |  1.5 KB  |  63 lines

  1. rem
  2. rem ****************
  3. rem * TESTCGI.BAT *
  4. rem ****************
  5. rem
  6. rem Test script for use with CGI example document included
  7. rem with server documentation. Blank line REQUIRED after
  8. rem Content-type header!
  9. rem
  10. rem Windows 95 flavor, brain-dead COMMAND.COM
  11. rem WARNING: Angle brackets are significant in REM statements!
  12. rem
  13. rem Bob Denny rdenny@netcom.com
  14. rem 20-Feb-95
  15. rem
  16. rem Echo is OFF at script entry. Don't use 'exit' or you'll defeat the
  17. rem shell hang for debugging.
  18. rem
  19. if "%os%"=="Windows_NT" goto oops
  20. set of=%output_file%
  21. echo Content-type: text/plain > %of%
  22. echo. >> %of%
  23. echo CGI/1.2 (Windows 95) test script report: >> %of%
  24. echo. >> %of%
  25. echo ----------------------- >> %of%
  26. echo Command line arguments: >> %of%
  27. echo ----------------------- >> %of%
  28. echo. >> %of%
  29. if "%1"=="" goto CONT1
  30. echo %1 %2 %3 %4 %5 %6 %7 %8 >> %of%
  31. goto CONT2
  32. :CONT1
  33. echo (none) >> %of%
  34. :CONT2
  35. echo. >> %of%
  36. echo ---------------------- >> %of%
  37. echo Environment variables: >> %of%
  38. echo ---------------------- >> %of%
  39. set >> %of%
  40. echo. >> %of%
  41. echo ------------- >> %of%
  42. echo Accept types: >> %of%
  43. echo ------------- >> %of%
  44. type %HTTP_ACCEPT% >> %of%
  45. echo. >> %of%
  46. if NOT "%REQUEST_METHOD%"=="POST" goto nocont
  47. echo ----------------- >> %of%
  48. echo Content for POST: >> %of%
  49. echo ----------------- >> %of%
  50. type %CONTENT_FILE% >> %of%
  51. echo. >> %of%
  52. :nocont
  53. echo -- end of report -- >> %of%
  54. goto finish
  55. :oops
  56. rem In case run under NT
  57. echo Content-type: text/plain
  58. echo.
  59. echo Wrong script for NT. Use testcgi.cmd
  60. :finish
  61.  
  62.  
  63.